//
//  Toast.m
//  Borderless
//
//  Created by Bager on 2017/9/12.
//  Copyright © 2017年 Bager. All rights reserved.
//

#import "Toast.h"

@implementation Toast

+ (void)alertViewWithMsg:(NSString *)msg view:(id)view
{
    MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:view];
    
    [view addSubview:hud];
    
    hud.mode = MBProgressHUDModeCustomView;
    
    hud.delegate = view;
    hud.detailsLabel.text = msg;
    hud.detailsLabel.font = [UIFont systemFontOfSize:14];
    hud.detailsLabel.textColor = [UIColor whiteColor];
    hud.bezelView.backgroundColor = [UIColor blackColor];
    
    [hud showAnimated:YES];
    [hud hideAnimated:YES afterDelay:2.5];
}

@end
